package com.fang.pool;

/**
 * @Description 测试类:
                    1: 创建线程池类对象;
                    2: 提交多个任务
 * @Author Bernie_fang
 * @Date 2023/1/15 22:16
 **/
public class PoolTest {

    public static void main(String[] args) {
        //1:创建线程池类对象;
        WorkThreadPool pool = new WorkThreadPool(2, 4, 20);
        //2: 提交多个任务
        for (int i = 0; i < 30; i++) {
            //3:创建任务对象,并提交给线程池
            WorkTask my = new WorkTask(i);
            pool.submit(my);
        }
    }

}
